<?php
$session=new CHttpSession();
$session->open();
$i=$session['i'];
$p=Profiles::model()->findByPk($data->uid);
$u=Users::model()->findByPk($data->uid);
?>

<tr<?php echo $i%2==1 ? '': ' class="tr1"'; ?>>
    <td align="center" class="td1<?php echo $i%2==1 ? '': ' td2"'; ?>"><a href="/index.php?r=job/view&id=<?php echo $data->job->jid;?>"><?php echo $data->job->title;?></a></td>
    <td class="<?php echo $i%2==1 ? '': ' td2"'; ?>"><?php echo $data->job->createtime;?></td>
    <td align="center"<?php echo $i%2==1 ? '': ' class="td2"'; ?>><?php echo !empty($p->nickname) ? $p->nickname : $u->username;?></td>
    <td align="center"<?php echo $i%2==1 ? '': ' class="td2"'; ?>><?php echo $u->username;?></td>
    <td align="center"<?php echo $i%2==1 ? '': ' class="td2"'; ?>><a href="/index.php?r=manage/deljoba&id=<?php echo $data->jid;?>">删除</a>
        |
        <a href="/index.php?r=users/index&id=<?php echo $data->uid;?>">查看</a></td>
</tr>

<?php
$session['i']=$i+1;
?>